package top.qitun.modal.request;

import java.util.UUID;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.NotBlank;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

import io.swagger.annotations.ApiModelProperty;
import top.qitun.model.request.RestfulRequest;

/**
 * @author Zhao Junjian
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler", "fieldHandler"}, ignoreUnknown = true)
public class CatalogCreateRequest extends RestfulRequest {
    private static final long serialVersionUID = -1L;

    @NotNull
    @Pattern(regexp = "^\\d.*$", message = "请输入11位手机号")
    @JsonProperty("shopId")
    @ApiModelProperty(value = "店铺id", example = "13", required = true)
    private String shopId;
    
    @NotNull
    @NotBlank
    @Size(min = 2, max = 50, message = "2到50位汉字数字字母组合")
    @JsonProperty("name")
    @ApiModelProperty(value = "菜单名称", example = "麻辣", required = true)
    private String name;

    
    @NotNull
    @NotBlank
    @Size(min = 2, max = 50, message = "2到50位汉字数字字母组合")
    @JsonProperty("picId")
    @ApiModelProperty(value = "图片id", example = "ca28ba3f-d0a5-44b9-a988-ca1de81a044f", required = true)
    private String picId;
    
    
    @NotNull
    @Pattern(regexp = "^\\d.*$", message = "排序序号")
    @JsonProperty("orderId")
    @ApiModelProperty(value = "排序序号", example = "1", required = true)
    private String orderId;
    

    public static void main(String[] args) {
		String result = UUID.randomUUID().toString();
		System.out.println(result);
	}
}
